package o;

import android.content.Context;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import com.huawei.appgallery.assistantdock.gamemode.card.BuoyBaseEnterCard;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import huawei.widget.HwTextView;
import o.beo.f;

public class bhr extends BuoyBaseEnterCard {
    private Context ʻ;
    private boolean ʽ;
    private String ͺ;
    private boolean ᐝ;

    public bhr(Context context, @NonNull String str, boolean z, boolean z2) {
        super(context);
        this.ʻ = context;
        this.ᐝ = z;
        this.ʽ = z2;
        this.ͺ = str;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (HiAnalyticsConstant.BI_KEY_SERVICE.equals(this.ͺ)) {
            this.ˊ.setText(f.ˏˎ);
            this.ʼ.setBackgroundResource(beo$d.ᐝ);
        } else if ("app".equals(this.ͺ)) {
            this.ˊ.setText(f.ˏ);
            this.ʼ.setBackgroundResource(beo$d.ॱॱ);
        }
    }

    public void ˋ() {
        if (!this.ʽ) {
            fam.ॱ().ॱ(this.ʻ, new bil(this.ʻ, this.ͺ, this.ᐝ));
            ˏ("CLICK");
        }
    }

    public void ˊ() {
        float f = 1.0f;
        if (this.ʽ) {
            float f2;
            HwTextView hwTextView = this.ˊ;
            if (this.ˏ) {
                f2 = 1.0f;
            } else {
                f2 = 0.3f;
            }
            hwTextView.setAlpha(f2);
            ImageView imageView = this.ʼ;
            if (!this.ˏ) {
                f = 0.3f;
            }
            imageView.setAlpha(f);
        }
    }

    public String ᐝ() {
        String str = null;
        if ("app".equals(this.ͺ)) {
            str = "ALLAPPS";
        } else if (HiAnalyticsConstant.BI_KEY_SERVICE.equals(this.ͺ)) {
            str = "ALLSERVICE";
        }
        Logger.ˎ("AllEnterCardBuoy", "getFuncUri = " + str);
        return str;
    }
}
